Skip to content

proposal: Allow providing default values for missing series in binary operations - #70

Merged
juliusv merged 8 commits into
mainfrom
binop-fill-operator
Dec 3, 2025
Merged

proposal: Allow providing default values for missing series in binary operations#70
juliusv merged 8 commits into
mainfrom
binop-fill-operator

Conversation

@juliusv

@juliusv juliusv commented Nov 26, 2025

Copy link
Copy Markdown
Member

… operations

See prometheus/prometheus#13625

Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>
Signed-off-by: Julius Volz <julius.volz@gmail.com>

@MichaHoffmann MichaHoffmann left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Julius Volz <julius.volz@gmail.com>
@juliusv

juliusv commented Dec 1, 2025

Copy link
Copy Markdown
Member Author

FYI, in the implementation and practical experimentation of this, I noticed that it doesn't make sense to disallow filling in the "many" side of a many-to-one / one-to-many match, even though we cannot make up (fill in) multiple missing series due to the unknown differentiating labels. We can still always fill in a single missing series that just has the match group's labels though. This can still be useful for people who want to use group_x(<labels>) in a 1:1 situation, but where they just want to include (<labels>) from one of the sides (usually, an info metric on the right side).

I've updated the proposal accordingly.

Comment thread proposals/0070-binop-fill-modifier.md
Comment thread proposals/0070-binop-fill-modifier.md

@bwplotka bwplotka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this. From UX this is something I have been missing often and fill looks like a simple enough solution 👍🏽

cc @realschwa

Signed-off-by: Julius Volz <julius.volz@gmail.com>
@juliusv

juliusv commented Dec 3, 2025

Copy link
Copy Markdown
Member Author

Going to merge this for now so I can properly link to it. That doesn't mean it can't change of course.

@juliusv
juliusv merged commit f030f5c into main Dec 3, 2025
2 checks passed
@juliusv
juliusv deleted the binop-fill-operator branch December 3, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants